<template>
	<view class="container">
		<view class="page-top">
			<view class="top-cell">
				<image mode="aspectFit" src="../../../static/image/help-01.png" class="icon"></image>
				<view class="cell-title">在线客服</view>
				<view class="cell-time">9:30-6:00</view>
				<button open-type="contact" class="contact-btn"></button>
			</view>
			<view class="top-cell" @click="call">
				<image mode="aspectFit" src="../../../static/image/help-02.png" class="icon"></image>
				<view class="cell-title">热线电话</view>
				<view class="cell-time">9:30-6:00</view>
			</view>
		</view>
		<view class="page-bottom">
			<view class="page-title">常见问题</view>
			<view class="question-list">
				<view class="question-cell" v-for="item in list" :key="item.id">
					<view class="question-title">{{item.title}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					title: '怎么开会员？'
				},{
					title: '怎么购买？'
				},{
					title: '什么时候发货？'
				},{
					title: '发什么快递？'
				},{
					title: '物流慢或者没更新？'
				},{
					title: '产品质量怎么样？'
				}]
			}
		},
		methods: {
			call() {
				uni.makePhoneCall({
					phoneNumber: 13800138000
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.container{
	min-height: 100vh;
	background: $page-gery-light;
	.page-top{
		background: #fff;
		padding: 50rpx 0 36rpx;
		border-radius: 0 0 24rpx 24rpx;
		display: flex;
		justify-content: space-evenly;
		align-items: stretch;
		box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.0400);
		.top-cell{
			position: relative;
			.icon{
				width: 96rpx;
				height: 96rpx;
				margin: 0 auto;
				display: block;
			}
			.cell-title{
				margin-top: 18rpx;
				text-align: center;
				font-size: 28rpx;
				color: #111;
			}
			.cell-time{
				font-size: 24rpx;
				color: #111;
				margin-top: 10rpx;
				text-align: center;
			}
			.contact-btn{
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				width: 100%;
				height: 100%;
				opacity: 0;
			}
		}
	}
	.page-bottom{
		border-radius: 24rpx;
		background: #fff;
		margin-top: 30rpx;
		padding: 42rpx 24rpx 30rpx;
		.page-title{
			padding-left: 22rpx;
			position: relative;
			font-size: 28rpx;
			color: #111;
			&:before{
				content: "";
				position: absolute;
				left: 0;
				top: 0;
				bottom: 0;
				width: 6rpx;
				border-radius: 3rpx;
				height: 80%;
				margin: auto;
				background: #009B65;
			}
		}
		.question-list{
			padding-top: 22rpx;
			.question-cell{
				display: flex;
				align-items: center;
				border-bottom: 2rpx solid #EEEEEE;
				padding: 22rpx 0;
				font-size: 26rpx;
				color: #140000;
			}
		}
	}
}
</style>
